package com.shou.types.common;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * ClassName:RoleEnum
 * Project:SmartPark
 * Package: com.shou.types.common
 * Description
 *
 * @Author Nemo
 * @Create 2025/2/18 17:30
 * @Version 1.0
 */
@Getter
@AllArgsConstructor
public enum RoleEnum {
    USER("普通用户"),
    ADMIN("管理员"),
    MEMBER("会员");

    private final String role;

    public static boolean checkRole(String role) {
        for (RoleEnum roleEnum : RoleEnum.values()) {
            if (roleEnum.getRole().equals(role)) {
                return true;
            }
        }
        return false;
    }
}
